<template>
    <div class="management-merchant views-container">
        <div class="wlm-table">
         
           <div class="wlm-table-content">
               <!-- :ref="tableFormatData.withdrawalrecord.key" :data="tableFormatData.withdrawalrecord.tableData" @selection-change="handleSelectionChange" -->
                <!-- v-model="tableFormatData.withdrawalrecord.files.status" type="card" @tab-click="filesSerch" -->
             <el-tabs type="card" v-model="tableFormatData.withdrawalrecord.files.type" @tab-click="filesSerch">
                <el-tab-pane label="我的提现" name="0"></el-tab-pane>
                <el-tab-pane label="商家提现" name="1"></el-tab-pane>
             </el-tabs>
            <el-table  style="width: 100%"  :ref="tableFormatData.withdrawalrecord.key" :data="tableFormatData.withdrawalrecord.tableData" @selection-change="handleSelectionChange">
                  <el-table-column label="提现账号">
                       <template slot-scope="scope">
                           <span>{{scope.row.agent_name || scope.row.bus_name}}</span>
                       </template>
                  </el-table-column>
                   <el-table-column label="申请渠道">
                       <template slot-scope="scope">
                           <span>{{scope.row.source}}</span>
                       </template>
                  </el-table-column>
                   <el-table-column label="提现金额">
                       <template slot-scope="scope">
                           <span>{{scope.row.apply_pay}}</span>
                       </template>
                  </el-table-column>
                   <el-table-column label="手续费">
                       <template slot-scope="scope">
                           <span>{{scope.row.sxf}}</span>
                       </template>
                  </el-table-column>
                   <el-table-column label="到账金额">
                       <template slot-scope="scope">
                            <span>{{scope.row.deserved_pay}}</span>
                       </template>
                  </el-table-column>
                   <el-table-column label="到账类型">
                       <template slot-scope="scope">
                           <span>{{scope.row.withdrawal_type}}</span>
                       </template>
                  </el-table-column>
                   <el-table-column label="申请时间">
                       <template slot-scope="scope">
                           <span>{{scope.row.create_time}}</span>
                       </template>
                  </el-table-column>
                   <el-table-column label="状态">
                       <template slot-scope="scope">
                           <span>{{scope.row.status}}</span>
                       </template>
                  </el-table-column>
            </el-table>
              <div class="pagination-content flex-row flex-justify-e flex-align-c">
                   <el-pagination :disabled="!hasTableData" @size-change="listPageChange" @current-change="listPageChange" :current-page.sync="tableFormatData.withdrawalrecord.pagination.page" :page-sizes="tableFormatData.withdrawalrecord.pagination.pagesizes" :page-size.sync="tableFormatData.withdrawalrecord.pagination.list_rows" layout="total, sizes, prev, pager, next, jumper" :total="hasTableData?tableFormatData.withdrawalrecord.pagination.total : 0">
                </el-pagination>
                </div>
           </div>
        </div>
    </div>
</template>

<script>
import {agentOnewithdrawalRecord} from "@/api/cityagent";
import mixins from '@/mixins/mixins'
export default {
     mixins: [mixins.getters('Table')],
    name: 'withdrawalrecord',
    data () {
        return {
            tableFormatData: {
        current: 'withdrawalrecord',
        withdrawalrecord: {
          key: 'withdrawalrecord',
          api: {
            getList: agentOnewithdrawalRecord,
          },
          tableData: [],
          files: {
            // nickName: '',
            // goods_name: '',
            // score: '',
            // source: '',
            // status: 'all',
            // ids: [],
            // redirect: 'comment_id',
            // checkall: '0',
            // Recycle: '0'
            type:'0'
          },
          pagination: {
            page: 1,
            list_rows: 10,
            pagesizes: [10, 20, 50],
            total: 0
          }
        }
      }
        }
    }
}
</script>